<!-- inc:header -->
<div class="notice"><div class="p">
	<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td width="130px"><span class="lead">&nbsp;&raquo; 添加/修改导航</span></td>
		<td align="right"><a href="{:site_url('menu')}" class="button">导航列表</a></td>
	</tr>
	</table>
</div></div>


<form method="post" action="{:site_url('menu,setok')}id={:$id}" onsubmit="return to_setok('{:$id}')">
<div class="table">
	<div class="left"><span class="red">*</span> 名称：</div>
	<input type="text" name="title" id="title" value="{:$rs[title]}">
	<span class="clue_on"> 名称不允许为空</span>
</div>
<div class="table">
	<div class="left">父级菜单：</div>
	<!-- if($id) -->
		<!-- if(!$rs[parentid]) -->
		<select name="parentid" id="parentid"><option value="0">设为根级分类</option></select>
		<!-- else -->
		<select name="parentid" id="parentid">
			<!-- $parentlist AS $key=>$value -->
			<option value="{:$value[id]}"{if($rs[parentid] == $value['id'])} selected{end}>{:$value[title]}</option>
			<!-- end -->
		</select>
		<!-- end -->
	<!-- else -->
		<select name="parentid" id="parentid">
			<option value="0">设为根级分类</option>
			<!-- $parentlist AS $key=>$value -->
			<option value="{:$value[id]}">{:$value[title]}</option>
			<!-- end -->
		</select>
	<!-- end -->
</div>
<div class="table">
	<div class="left"><span class="red">*</span> 链接：</div>
	<input type="text" name="link" id="link" value="{:$rs[link]}" class="long_input">
	<span class="clue_on">[关于链接的填写，不清楚，<a href="http://www.phpok.com" target="_blank">请查看官方网站帮助中心</a>]</span>
</div>

<div class="table">
	<div class="left">打开方式：</div>
	<table>
	<tr>
		<td><input type="radio" name="target" value="1"{if($rs[target])} checked{end} /></td>
		<td>新窗口&nbsp;</td>
		<td><input type="radio" name="target" value="0"{if(!$rs[target])} checked{end} /></td>
		<td>原窗口</td>
	</tr>
	</table>
</div>

<div class="table">
	<div class="left">提示：</div>
	<input type="text" name="note" id="note" value="{:$rs[note]}" class="long_input">
	<span class="clue_on">[鼠标移到菜单时的文字提示，为空使用标题提示]</span>
</div>

<div class="table">
	<div class="left">排序：</div>
	<input type="text" name="taxis" id="taxis" value="{:$rs[taxis] ? $rs[taxis] : 255}" class="short_input">
	<span class="clue_on">[请填写排序值，最大为255，值越小越往前靠]</span>
</div>

<div class="table">
	<div class="left">&nbsp;</div>
	<input type="submit" id="qgbutton" class="mybutton_01" value="提 交">
</div>
</form>

<script type="text/javascript">
var gd_url = base_file + "?"+base_ctrl+"=menu&"+base_func+"=";
//[对输入的数据进行检测]
function to_setok(id)
{
	var subject = getid("title").value;
	if(!subject || subject == "undefined")
	{
		alert("标题不允许为空");
		return false;
	}
	var linkurl = getid("link").value;
	if(!linkurl || linkurl == "undefined")
	{
		alert("网址不允许为空");
		return false;
	}
	getid("qgbutton").disabled = true;
	return true;
}
</script>

<!-- inc:footer -->